package org.deng.learn.designpattern.abstractfactory;

/**
 * @author DengLibin
 * @Description
 * @Date 2019/2/12 0012 14:49
 */
public class FactoryProvider {

    public static AbstractFactory getFactory(FactoryType factoryType){
        switch (factoryType){
            case COLOR_FACTORY:
                return new ColorFactory();
            case SHAPE_FACTORY:
                return new ShapeFactory();
        }
        throw new RuntimeException("参数不正确");
    }
}
